﻿<BadHabit_Factory_Controls:TaskPanelBase
    x:Name="taskPanel"
    x:Class="BadHabit.Factory.Controls.TaskPostItPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:BadHabit_Factory="clr-namespace:BadHabit.Factory"      
    xmlns:BadHabit_Factory_Controls="clr-namespace:BadHabit.Factory.Controls"        
    xmlns:BadHabit_WPFTools="clr-namespace:BadHabit.WPFTools;assembly=BadHabit.WPFTools"
    
    xmlns:props="clr-namespace:BadHabit.Factory.Properties"
    

    
    HorizontalAlignment="Stretch"
    VerticalAlignment="Stretch"
    Background="Transparent">


        <Grid x:Name="ContentPanel" VerticalAlignment="Stretch"  >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>                    
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="270"/>
                <ColumnDefinition Width="*"/>                
            </Grid.ColumnDefinitions>


        <DockPanel 
                Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0">
            <!-- TOOL BAR -->
            <!-- TOOL BAR -->
            <BadHabit_Factory_Controls:TaskToolBar
                x:Name="taskToolBar"
                IsPostItPanel="True"
                FocusManager.IsFocusScope="True"
                Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0"
                >
                <BadHabit_Factory_Controls:TaskToolBar.CommandBindings>
                    <CommandBinding Command="BadHabit_Factory:FactoryCommands.AddTask" Executed="AddTask_Executed"/>
                    <CommandBinding Command="BadHabit_Factory:FactoryCommands.AddProjectTask" Executed="AddTask_Executed"/>
                    <CommandBinding Command="ApplicationCommands.Paste" Executed="Paste_Executed"/>
                </BadHabit_Factory_Controls:TaskToolBar.CommandBindings>
            </BadHabit_Factory_Controls:TaskToolBar>
            <Button
                        x:Name="commitButton"
                        DockPanel.Dock="Right"
                        Style="{StaticResource CommitButton}"
                        Command="ApplicationCommands.Save"
                        HorizontalAlignment="Right" 
                        Margin="5" />

        </DockPanel>

            



            <!-- BACKLOG ITEM LIST BOX -->
            <BadHabit_Factory_Controls:BacklogItemListBox                 
                x:Name="backlogItemListBox"                    
                Grid.Column="0" Grid.Row="1"                                 
                HorizontalAlignment="Stretch"/>    
            

            <Border
                Grid.Column="1" Grid.Row="1"
                Style="{StaticResource RoundBorder}">
                
                <!-- TASKS CONTAINER -->
                <ContentControl
                x:Name="taskContainer"
                
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch">


                    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>

                        <BadHabit_Factory_Controls:TaskPostItViewer
                        x:Name="postItToDoListBox"
                        Margin="0,5,0,0"
                        BorderThickness="0,0,1,0"                
                        Grid.Column="0"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        TaskStatusFilter="TASK_REQUIRED"
                        BacklogItemFilter="{Binding ElementName=backlogItemListBox, Path=SelectedBacklogItem}"
                        TaskSearchFilter="{Binding ElementName=taskToolBar, Path=SearchText}"
                        
                        
                        />

                        <BadHabit_Factory_Controls:TaskPostItViewer
                        x:Name="postItWorkingListBox"
                        Margin="0,5,0,0"
                        BorderThickness="0,0,1,0"
                        Grid.Column="1"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"     
                        TaskStatusFilter="TASK_WORKINGON"
                        BacklogItemFilter="{Binding ElementName=backlogItemListBox, Path=SelectedBacklogItem}"
                        TaskSearchFilter="{Binding ElementName=taskToolBar, Path=SearchText}"  
                        
                        
                        />

                        <BadHabit_Factory_Controls:TaskPostItViewer
                        x:Name="postItDoneListBox"
                        Margin="0,5,0,0"
                        BorderThickness="0,0,0,0"
                        Grid.Column="2"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"     
                        TaskStatusFilter="TASK_DONE"
                        BacklogItemFilter="{Binding ElementName=backlogItemListBox, Path=SelectedBacklogItem}"
                        TaskSearchFilter="{Binding ElementName=taskToolBar, Path=SearchText}"
                        
                        
                        />

                        <GridSplitter Grid.Column="0"  Width="2" Background="LightGray"/>
                        <GridSplitter Grid.Column="1"  Width="2" Background="LightGray"/>

                    </Grid>

                </ContentControl>
            </Border>
            


            <GridSplitter Grid.Column="0" Grid.Row="1" Width="1" Background="Transparent"/>
                

        </Grid>
  
    
</BadHabit_Factory_Controls:TaskPanelBase>
